﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
@Html.Partial("LoadPanelPartial")
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>@ElingOA6_Admin_DSJCJ.Common.GlobalConstant.CONSTRING_SYSTITLE</title>
          @if (false)
   {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
   }
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
<style>
*{ margin:0px auto; padding:0px;}
body{ background:url(@Url.Content("~/Content/images/bg2.jpg")) repeat-x top; font-family:"Microsoft Yahei","Tahoma","SimSun","宋体"; font-size:14px;}
.font16{ font-size:16px; font-weight:bold;}
</style>
<style>
    
    .tableForm
{
	width: 100%;
	border: solid 1px #c9c9c9;
	border-collapse: collapse;
}
.tableForm td
{
}

.tableForm .tdClass
{
	padding: 0px;
    border : solid 1px #c9c9c9;
    line-height:20px;
	padding: 5px 5px;
	
}
  /*  .FixedTitleRow
        {
            position: relative; 
            top: expression(this.offsetParent.scrollTop-5); 
            z-index: 2;
            background-color: White;
        }.scrollColThead {position: relative;top: expression(this.parentElement.parentElement.parentElement.scrollTop);z-index:2;} */
</style>
    <script>
        $(function () {
            $("#toolMenu").smartFloat();
            iframeAutoFit();
            var hdjsAlert = $("#hdjsAlert").val();
            if (hdjsAlert != "") {
                if (hdjsAlert == "操作成功") {
                    alert(hdjsAlert);
                    window.parent.opener = null;
                    window.parent.open("", "_self", "");
                    window.parent.close();
                }
                else {
                    alert(hdjsAlert);
                    window.parent.opener = null;
                    window.parent.open("", "_self", "");
                    window.parent.close();
                }
            }
        });

        function getCheckedValue(radioObj) {
            if (!radioObj)
                return "";
            var radioLength = radioObj.length;
            if (radioLength == undefined)
                if (radioObj.checked)
                    return radioObj.value;
                else
                    return "";
            for (var i = 0; i < radioLength; i++) {
                if (radioObj[i].checked) {
                    return radioObj[i].value;
                }
            }
            return "";
        }
        function ok() {
            for (i = 0; i < form1.all.length; i++) {
                if (form1.all(i).tagName == "INPUT") {
                    var oitem = form1.all.item(i);
                    var sname = oitem.name;
                    if (oitem.type.toLowerCase() == "radio") {
                        if (getCheckedValue(document.getElementsByName(oitem.name)) == "") {
                            oitem.focus();
                            window.scrollBy(0, -30);
                            alert("请认真填写所有题目。");
                            return (false);
                        }
                    }
                }
            }

            form1.submit();

        }
        function iframeAutoFit() {
            var ex;
            try {
                if (window != parent) {
                    var a = parent.document.getElementsByTagName("IFRAME");
                    for (var i = 0; i < a.length; i++) {
                        //window.name != "contentframe"后台页面iframe名称
                        if (a[i].contentWindow == window && window.name != "contentframe") {
                            var h1 = 0, h2 = 0;
                            if (document.documentElement && document.documentElement.scrollHeight) {
                                h1 = document.documentElement.scrollHeight;
                            }
                            if (document.body) h2 = document.body.scrollHeight;
                            var h = Math.max(h1, h2);
                            if (window.ActiveXObject) { h += 4; }
                            else { h += 4; }
                            a[i].style.height = h + "px";
                            window.removeEventListener('resize', iframeAutoFit, false); //兼容谷歌浏览器时要去掉RISZE监听
                        }
                    }
                }
            }
            catch (ex) { }
        }

        function Cancel() {
            this.close();
        }

        function check(cd) {
            lpOperation.Show();
            $.ajax({
                success: function () {
                    for (i = 0; i < form1.all.length; i++) {
                        if (form1.all(i).tagName == "INPUT") {
                            var oitem = form1.all.item(i);
                            var sname = oitem.value;
                            if (oitem.type.toLowerCase() == "radio") {
                                if (oitem.value == cd) {
                                    oitem.checked = true;
                                }
                            }
                        }
                    }
                    lpOperation.Hide();
                }
            });
        }

    </script>
</head>
<body style="	font-size: 12px;">
@using (Html.BeginForm("Save", "PeerReviewScore", FormMethod.Post, new { id = "form1" }))
{
    <table width="1001" align="center" cellspacing="0">
  <tr>
    <td><img src="@Url.Content("~/Content/images/logo.jpg")" width="1001"/></td>
  </tr>
</table>
    
    <table width="1001" align="center" cellspacing="0">
  <tr>
    <td width="25"  bgcolor="#FFFFFF"><img src="@Url.Content("~/Content/images/left.jpg")" width="27" height="29" /></td>
    <td width="100%" bgcolor="#FFFFFF"   height="29" >&nbsp;</td>
    <td width="26"  bgcolor="#FFFFFF"><img src="@Url.Content("~/Content/images/right.jpg")" width="28" height="29" /></td>
  </tr>
  <tr>
  <td colspan="3"  bgcolor="#FFFFFF"  align="center" class="font16">@ViewData["title"] </td>
  </tr>
  <tr>
  
  <td colspan="3">
    <div style=" text-align:center; width:100%; background-color:White">
    
    @if (ViewData["xxList"] != null)
    {
        <table>
        <tr>
        @foreach (ElingOA6_Admin_DSJCJ.Model.PeerReviewRuleOption rowColum in ViewData["xxList"] as List<ElingOA6_Admin_DSJCJ.Model.PeerReviewRuleOption>)
        { 
             //   <input type="button" value="全部选中" onclick="check('01')" style=" width:100px" />
               <td>
               @Html.DevExpress().Button(settings =>
               {
                   settings.Name = "btnCheck" + rowColum.FPeerReviewRuleScoreCd;
                   settings.Text = "全部" + rowColum.FScoreName;
                   settings.ControlStyle.Font.Name = "Microsoft Yahei";
                   settings.ClientSideEvents.Click = "function(){check('" + rowColum.FPeerReviewRuleScoreCd + "')}";

               }).GetHtml()
               </td>
        }
        </tr>
        </table>
    }
    </div>
  </td></tr>
  <tr>
  <td colspan="3">
  
     <table align="center" width="100%" cellpadding="5" cellspacing="1"  style=" background-color:White">
     <tr>
     <td colspan="2"> 
       @Html.Raw(ViewData["table"].ToString())
     </td>
     </tr>
     <tr>
     <td>
     @if (ViewData["table"].ToString() != "")
     {
         <table align="center" cellpadding="5" cellspacing="1"  style=" background-color:White">
            <tr>
                <td style=" text-align:right">
                    @Html.DevExpress().Button(settings =>
               {
                   settings.Name = "btnOK";
                   settings.Text = "提交评议";
                   settings.ClientSideEvents.Click = "ok";
                   settings.ControlStyle.Font.Name = "Microsoft Yahei";
                   settings.Images.Image.Url = Url.Content("~/Content/ControlImages/ok.png");

               }).GetHtml()
                </td>
                <td style=" text-align:left">
                    @Html.DevExpress().Button(settings =>
               {
                   settings.Name = "btnCancel";
                   settings.Text = "取消";
                   settings.ClientSideEvents.Click = "Cancel";
                   settings.ControlStyle.Font.Name = "Microsoft Yahei";
                   settings.Images.Image.Url = Url.Content("~/Content/ControlImages/no.png");
                   settings.CausesValidation = false;

               }).GetHtml()
                </td>
            </tr>
            </table>
     }
          </td>
            </tr>
        </table>
        </td>
  </tr>
  </table>
         @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]))
}
</body>
</html>
